package com.byedu.util;

import com.byedu.model.enums.QuestionTypeEnum;

/**
 * Created by jason on 2017/7/5.
 */
public class QuestionUtil {

    public static String getQuestionTypeName (String questionTypeTitle) {
        String type = QuestionTypeEnum.single.name();
        if (questionTypeTitle.indexOf(QuestionTypeEnum.single.getTitle()) != -1) {
            type = QuestionTypeEnum.single.name();
        } else if (questionTypeTitle.indexOf(QuestionTypeEnum.multiple.getTitle()) != -1) {
            type = QuestionTypeEnum.multiple.name();
        } else if (questionTypeTitle.indexOf(QuestionTypeEnum.judgments.getTitle()) != -1) {
            type = QuestionTypeEnum.judgments.name();
        }

        return type;
    }

}
